﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using yiCommerce.Mapper;
using yiCommerce.Models.Customers;
using yiCommerce.Service.Tags;

namespace yiCommerce.Controllers
{
    public class CustomerTagController : Controller
    {

       int pageSize = 5;


        private ITagIntroService _tagIntroService;


        public CustomerTagController(ITagIntroService tagIntroService)
        {
            _tagIntroService = tagIntroService;
        }

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult ChooseIneterstedTags(bool isFromRegist)
        {
            var tagintros = _tagIntroService.FindTagIntro(0, pageSize);
            var model = new CustomerTagModel()
                {
                    TagsAvailable = StatusMapper.ToPagedTagStatusesList(tagintros),
                    IsFromRegist = isFromRegist,
                };
            ViewBag.Model = model;
            return View();
        }

    }
}
